<template>
  <div class="title flex shrink">
    <div class="icon">
      <slot name="icon">
        <img
          src="../images/clgc.png"
          @error="imageHandler(path + '/client/ylHome/images/clgc.png', $event)"
        />
      </slot>
    </div>
    <i class="grow"></i>
    <div class="right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
import * as fn from "../script/utils";
import { CLIENT } from "@/common/const";

export default {
  props: ["name"],
  data() {
    return {
      path: CLIENT,
      imageHandler: fn.imageHandler,
    };
  },
  methods: {},
};
</script>

<style scoped lang="scss">
.title {
  padding-right: 15px;
  border: 1px solid #434448;
  align-items: center;
  height: 52px;
  box-sizing: border-box;
  background: #27282e;
}
.right {
  font-size: 16px;
  font-weight: 400;
  color: #e1e1e1;
  a:hover {
    color: #bcbfc4;
  }
}
</style>
